/***********************************************************************
 * Module:  Manager.java
 * Author:  penwei
 * Purpose:系统管理员
 ***********************************************************************/

package cn.hdmis.entity;

import java.util.Date;
import java.util.Set;

public class Manager implements java.io.Serializable {
	private static final long serialVersionUID = -9207664361399280125L;
	/**	 */
	private Integer id;
	/**	真实姓名 */
	private String name;
	/**	登陆ID */
	private String loginId;
	/**	密码 */
	private String password;
	/**	账号是否可用 */
	private Integer status;
	/**	权限标识 */
	private Integer permissionTag;
	/**	创建时间 */
	private Date creadDate;
	/**	禁用时间 */
	private Date disableDate;
	/**	最后登陆时间 */
	private Date loginDate;
	/**	操作记录 */
	private Set<OpRecord> ords;

	public Manager() {
		// TODO Auto-generated constructor stub
	}

	/**
	 * Get value of id
	 * 
	 * @return id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * Set value of id
	 * 
	 * @param newId
	 */
	public void setId(Integer newId) {
		this.id = newId;
	}

	/**
	 * Get value of name
	 * 
	 * @return name
	 */
	public String getName() {
		return name;
	}

	/**
	 * Set value of name
	 * 
	 * @param newName
	 */
	public void setName(String newName) {
		this.name = newName;
	}

	/**
	 * Get value of loginId
	 * 
	 * @return loginId
	 */
	public String getLoginId() {
		return loginId;
	}

	/**
	 * Set value of loginId
	 * 
	 * @param newLoginId
	 */
	public void setLoginId(String newLoginId) {
		this.loginId = newLoginId;
	}

	/**
	 * Get value of password
	 * 
	 * @return password
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * Set value of password
	 * 
	 * @param newPassword
	 */
	public void setPassword(String newPassword) {
		this.password = newPassword;
	}

	/**
	 * Get value of status
	 * 
	 * @return status
	 */
	public Integer getStatus() {
		return status;
	}

	/**
	 * Set value of status
	 * 
	 * @param newStatus
	 */
	public void setStatus(Integer newStatus) {
		this.status = newStatus;
	}

	/**
	 * Get value of permissionTag
	 * 
	 * @return permissionTag
	 */
	public Integer getPermissionTag() {
		return permissionTag;
	}

	/**
	 * Set value of permissionTag
	 * 
	 * @param newPermissionTag
	 */
	public void setPermissionTag(Integer newPermissionTag) {
		this.permissionTag = newPermissionTag;
	}

	/**
	 * Get value of creadDate
	 * 
	 * @return creadDate
	 */
	public java.util.Date getCreadDate() {
		return creadDate;
	}

	/**
	 * Set value of creadDate
	 * 
	 * @param newCreadDate
	 */
	public void setCreadDate(java.util.Date newCreadDate) {
		this.creadDate = newCreadDate;
	}

	/**
	 * Get value of disableDate
	 * 
	 * @return disableDate
	 */
	public java.util.Date getDisableDate() {
		return disableDate;
	}

	/**
	 * Set value of disableDate
	 * 
	 * @param newDisableDate
	 */
	public void setDisableDate(java.util.Date newDisableDate) {
		this.disableDate = newDisableDate;
	}

	/**
	 * Get value of loginDate
	 * 
	 * @return loginDate
	 */
	public java.util.Date getLoginDate() {
		return loginDate;
	}

	/**
	 * Set value of loginDate
	 * 
	 * @param newLoginDate
	 */
	public void setLoginDate(java.util.Date newLoginDate) {
		this.loginDate = newLoginDate;
	}

	public void setOrds(Set<OpRecord> ords) {
		this.ords = ords;
	}

	public Set<OpRecord> getOrds() {
		return ords;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	public boolean equals(Object obj) {

		if (obj == null)
			return false;

		if (obj == this)
			return true;

		if (!(obj instanceof Manager))
			return false;
		else{
			Manager mg = (Manager)obj;
			return this.getId()==mg.getId();
		}
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		int hashCode = 0;
		if (this.id != null)
			hashCode = 29 * hashCode + id.hashCode();
		if (this.name != null)
			hashCode = 29 * hashCode + name.hashCode();
		if (this.loginId != null)
			hashCode = 29 * hashCode + loginId.hashCode();
		if (this.password != null)
			hashCode = 29 * hashCode + password.hashCode();
		if (this.status != null)
			hashCode = 29 * hashCode + status.hashCode();
		if (this.permissionTag != null)
			hashCode = 29 * hashCode + permissionTag.hashCode();
		if (this.creadDate != null)
			hashCode = 29 * hashCode + creadDate.hashCode();
		if (this.disableDate != null)
			hashCode = 29 * hashCode + disableDate.hashCode();
		if (this.loginDate != null)
			hashCode = 29 * hashCode + loginDate.hashCode();
		return hashCode;
	}

}